<%--
  Created by IntelliJ IDEA.
  User: Kirito
  Date: 2022/3/8
  Time: 13:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>用户列表</title>
    <link href="/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="/js/jquery.min.js" type="text/javascript"></script>
    <script src="/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
    <h1>用户(点名人)</h1>
    <table class="table table-striped table-hover table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>已点名次数</th>
        </tr>


        </thead>
        <tbody></tbody>
    </table>
</div>
<script type="text/javascript">
    $(function () {
        $.get(
            "/user/list",
            function (data) {
                for (var  i in data){
                    var  tr=$("<tr></tr>");
                    tr.append("<td>"+data[i].id+"</td>");
                    tr.append("<td>"+data[i].name+"</td>");
                    tr.append("<td>"+data[i].checkNum+"</td>");
               $("tbody").append(tr);
                }
            }
        )
    })
</script>
</body>
</html>
